package com.sumainfor.pc.gmio.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.DiChargesDeptService;
import com.sumainfor.pc.gmio.service.HoSurveyTopicService;
import com.sumainfor.pc.gmio.service.HoTenantBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 *租客端问卷调查
 */
@RestController
@RequestMapping("/tenant/key/housekeeper/HoSurveyTopic")
public class HoWxSurveyTopicController implements Serializable {
    @Autowired
    private HoSurveyTopicService hoSurveyTopicService;
    @Autowired
    private HoTenantBillService hoTenantBillService;

    /**
     *查询问卷调查的列表
     */
    @GetMapping("/getHoSurveyTopicList")
    public JsonResult getHoSurveyTopicList(@RequestParam Map<String,Object> params){
        JsonResult result=new JsonResult();
        List<Map<String,Object>> list=hoSurveyTopicService.getHoSurveyTopicList(params);
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
    /**
     * 续签的时候查询上一份合同的全部未支付账单
     */
    @PostMapping("/getHoUnpaidBillList")
    public JsonResult getHoUnpaidBillList(@RequestBody Map<String,Object>params){
        return hoTenantBillService.getHoUnpaidBillList(params);
    }
    /**
     * 续签的时候查询上一份合同的全部未支付账单
     */
    @PostMapping("/getRenUnifiedPact")
    public JsonResult getRenUnifiedPact(@RequestBody Map<String,Object>params){
        return hoTenantBillService.getRenUnifiedPact(params);
    }


    /**
     * 续租查询合同未支付的账单
     * @param params
     * @return
     */
    @PostMapping("/getPaIdNoBill")
    public JsonResult getPaIdNoBill(@RequestBody Map<String,Object> params){
        return hoTenantBillService.getPaIdNoBill(params);
    }




}
